home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr50
/
qbmnus16.zip
/
FKEYSAMP.BAS
< prev
next >
Wrap
BASIC Source File
|
1993-04-16
|
3KB
|
90 lines
DECLARE SUB FkeyMenu (boxstyle%, fc%, bc%, tr%, lc%)
CLS
PRINT STRING$(2080, 219)
FkeyMenu 2, 15, 4, 5, 44
' │ │ │ │ └───┐
' │ └┐ └┐ └─┐ │
' boxstyle% fc% bc% └─tr% lc%
' ──────────────────────────────────────────
' Boxstyle:
' There are five choices of boxstyles (Press F 3 on the Tools Menu
' to see what they look like.)
' ──────────────────────────────────────────
' Fc%:
' Foreground color (Pick any color from 1 to 15)
' ──────────────────────────────────────────
' Bc%:
' Background color (Pick any color from 1 to 15)
' ──────────────────────────────────────────
' Tr%:
' Location of row for first line of box. (Placing longer menus below
' rows 12 to 16 will cause them not to properly appear on the screen.)
' ──────────────────────────────────────────
' Lc%:
' Location of first column for first line of box. (Menus are 25 columns
' wide, placing them near the edge of the screen at column 66 or greater
' will cause distortion.)
SUB FkeyMenu (boxstyle%, fc%, bc%, tr%, lc%)
DIM menu$(0 TO 11)
COLOR fc%, bc%
SELECT CASE boxstyle%
CASE 1 ' elements for box building
side$ = "│"
LOCATE tr%, lc%: PRINT "┌───────────────────────┐"
LOCATE tr% + 11, lc%: PRINT "└───────────────────────┘"
CASE 2
side$ = "║"
LOCATE tr%, lc%: PRINT "╔═══════════════════════╗"
LOCATE tr% + 11, lc%: PRINT "╚═══════════════════════╝"
CASE 3
side$ = "║"
LOCATE tr%, lc%: PRINT "╓───────────────────────╖"
LOCATE tr% + 11, lc%: PRINT "╙───────────────────────╜"
CASE 4
side$ = "│"
LOCATE tr%, lc%: PRINT "╒═══════════════════════╕"
LOCATE tr% + 11, lc%: PRINT "╘═══════════════════════╛"
CASE 5
side$ = "█"
LOCATE tr%, lc%: PRINT STRING$(25, 219)
LOCATE tr% + 11, lc%: PRINT STRING$(25, 219)
END SELECT
menu$(1) = side$ + " F 1 = ITEM 1 " + side$ ' sets up spacing
menu$(2) = side$ + " F 2 = ITEM 2 " + side$ ' for menu entries
menu$(3) = side$ + " F 3 = ITEM 3 " + side$
menu$(4) = side$ + " F 4 = ITEM 4 " + side$
menu$(5) = side$ + " F 5 = ITEM 5 " + side$
menu$(6) = side$ + " F 6 = ITEM 6 " + side$
menu$(7) = side$ + " F 7 = ITEM 7 " + side$
menu$(8) = side$ + " F 8 = ITEM 8 " + side$
menu$(9) = side$ + " F 9 = ITEM 9 " + side$
menu$(10) = side$ + " F 10 = EXIT PROGRAM " + side$
FOR set = 0 TO 11
LOCATE set + tr%, lc%: COLOR fc%, bc%: PRINT menu$(set)
NEXT
DO
DO
keys$ = INKEY$
LOOP WHILE keys$ = ""
keymove = ASC(RIGHT$(keys$, 1)) ' Determines which scancode to use; also
' locks out all other key presses that
' aren't in the case statments
SELECT CASE keymove ' Edit out END and place your own code in the cases
CASE 59: END ' Scancode for F1 key
CASE 60: END ' Scancode for F2 key
CASE 61: END ' Scancode for F3 key
CASE 62: END ' Scancode for F4 key
CASE 63: END ' Scancode for F5 key
CASE 64: END ' Scancode for F6 key
CASE 65: END ' Scancode for F7 key
CASE 66: END ' Scancode for F8 key
CASE 67: END ' Scancode for F9 key
CASE 68: END ' Scancode for F10 key
END SELECT
LOOP
END
END SUB